package com.applet.orders.service;

import com.alibaba.fastjson.JSONObject;
import com.applet.dto.OrdersPageQueryDTO;
import com.applet.dto.OrdersPaymentDTO;
import com.applet.dto.OrdersSubmitDTO;
import com.applet.entity.Orders;
import com.applet.result.PageResult;
import com.applet.vo.OrderPaymentVO;
import com.applet.vo.OrderSubmitVO;
import com.applet.vo.OrderVO;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 订单管理 service
 */
public interface OrderService {


    /**
     * 订单  用户下单
     */
    OrderSubmitVO submitOrder(OrdersSubmitDTO ordersSubmitDTO);


    /**
     * 订单  微信预支付订单
     */
    OrderPaymentVO payment(OrdersPaymentDTO ordersPaymentDTO);


    /**
     * 微信服务调用此接口
     * 订单  支付成功后结果处理
     */
    void paymentSuccessNotify(HttpServletRequest request, HttpServletResponse response);


    /**
     * 订单 历史订单 分页-条件查询
     */
    PageResult queryPage(Integer page, Integer pageSize, Integer status);


    /**
     * 订单 根据id查询订单和明细
     */
    OrderVO getById(Long id);


    /**
     * 订单 用户取消订单
     */
    void userCancelOrder(Long id);


    /**
     * 订单 再来一单
     */
    void repeatOrder(Long id);


    /**
     * 订单 用户催单
     */
    JSONObject userReminderOrder(Long id);
}
